package com.geeguo.ebuilder.operation.business.tenant.tenantinfo.producer;

import com.geeguo.ebuilder.operation.base.core.constants.MQTopicConstants;
import org.apache.commons.lang3.StringUtils;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TenantInfoMQProducer {

    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    public void sendChangeMessage(String code) {
        if (StringUtils.isEmpty(code)) {
            return;
        }
        rocketMQTemplate.convertAndSend(MQTopicConstants.TENANT_INFO_CHANGE, code);
    }
}